export default {
  namespace: 'counter',
  state: {
    count: 0,
  },
  effects: {
    *increment(action, { call, put }) {
      yield put({ type: 'save', payload: 1 });
    },
  },
  reducers: {
    save(state, { payload }) {
      state.count = state.count + payload
    },
  },
};
